package com.xlhj.boot.common;

import java.io.Serializable;

/**
 * @author: liucaijing
 * @description: ObjectResult
 * @date: 2021/6/21 17:14
 */
public class ObjectResult<T> implements Serializable {

    protected String status = "0";
    protected String message;

    protected Boolean success = true;
    protected T object;

    public ObjectResult() {
    }

    public boolean isSuccess() {
        return this.success;
    }

    public ObjectResult(T data) {
        this.object = object;
    }

    public ObjectResult<T> success(T object) {
        this.object = object;
        this.success = true;
        return this;
    }

    public ObjectResult<T> success() {
        this.success = true;
        return this;
    }


    public Boolean getSuccess() {
        return this.success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public T getObject() {
        return this.object;
    }

    public void setObject(T object) {
        this.object = object;
    }
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
